package com.doit.demo01;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class test02 {
    public static void main(String[] args) {
        BigDecimal a = new BigDecimal("351.5");
        BigDecimal b = new BigDecimal("351.51");
        BigDecimal subtract = b.subtract(a);
        System.out.println(subtract);

        //基本类型与包装类型的转换
        Integer in = new Integer(10); //装箱
        int value = in.intValue(); //拆箱
        System.out.println(value);
        List <Integer>list = new ArrayList<>();
        Collections.addAll(list,1,2,3,40,50);
        System.out.println(list);
        list.remove(0);
        System.out.println(list);
        list.remove(new Integer(40)); //删除的是这个数据,而不是索引出的数据
        System.out.println(list);
    }
}
